#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

%:
	dh $@ --without autoreconf

override_dh_missing:
	dh_missing --fail-missing -Xpeony-gksu

override_dh_install:
	rm -rfv debian/tmp/usr/lib/*/peony-sendto/plugins/*.la
	rm -rfv debian/tmp/usr/lib/*/peony/extensions-2.0/*.la
	dh_install

override_dh_installdocs:
	dh_installdocs -A NEWS

override_dh_auto_configure:
	# upstream tarball is without configure. autogen.sh will create it
	cmake -Hpeony-admin -Bpeony-admin/
	NOCONFIGURE=1 ./autogen.sh
	dh_auto_configure $(DHFLAGS) -- \
		--disable-silent-rules \
		--enable-gtk-doc \
		--disable-packagekit \
		--enable-magic \
		--libexecdir=/usr/lib/parchives
